<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 50px;
            margin: 100px;
            background-color: coral;
            color: #fff;
            font-size: 28px;
            text-align: center;

        }

        .box {
            position: relative;
            display: inline-block;
            padding: .5em 1em .35em;
            color: white;
        }

        .box::before {
            content: '';
            /* 用伪元素来生成一个矩形 */
            position: absolute;
            top: -8px;
            right: -32px;
            bottom: 0;
            left: -32px;
            z-index: -1;
            background: coral;
            /* transform: perspective(.5em) rotateX(5deg); */
            transform: scaleY(1.4) perspective(.85em) rotateX(5deg);
            transform-origin: bottom;
        }
    </style>
</head>

<body>
    <div class=" box">梯形</div>
</body>

</html>